package com.ls.controller.example;

import com.ls.controller.example.model.QueryExampleModel;
import com.ls.service.IExampleService;
import com.ls.utils.ResultData;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import static com.ls.constant.SystemConstants.NUMBER_0;
import static com.ls.constant.SystemConstants.VALID_TRUE;

/**
 * <p>
 * 示例 前端控制器
 * </p>
 *
 * @author pengyu
 * @since 2024-10-12
 */
@Api(value = "app示例相关接口", tags = "app示例相关接口")
@RestController
@RequiredArgsConstructor
@RequestMapping("/exampleApp")
public class ExampleAppController {
    private final IExampleService service;
    /** 查看示例  */
    @GetMapping("getPaging")
    public ResultData getPaging(QueryExampleModel model) {
        model.setValidFlag(VALID_TRUE);
        model.setType(NUMBER_0);
        return service.getPaging(model);
    }
}
